package com.ltkj.ticket.service.impl;

import java.util.List;
import com.ltkj.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ltkj.ticket.mapper.TicVenuesConfigMapper;
import com.ltkj.ticket.domain.TicVenuesConfig;
import com.ltkj.ticket.service.ITicVenuesConfigService;

/**
 * 场馆门票时间段配置Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-08-30
 */
@Service
public class TicVenuesConfigServiceImpl implements ITicVenuesConfigService 
{
    @Autowired
    private TicVenuesConfigMapper ticVenuesConfigMapper;

    /**
     * 查询场馆门票时间段配置
     * 
     * @param ticVenuesConfigId 场馆门票时间段配置主键
     * @return 场馆门票时间段配置
     */
    @Override
    public TicVenuesConfig selectTicVenuesConfigByTicVenuesConfigId(Long ticVenuesConfigId)
    {
        return ticVenuesConfigMapper.selectTicVenuesConfigByTicVenuesConfigId(ticVenuesConfigId);
    }

    /**
     * 查询场馆门票时间段配置列表
     * 
     * @param ticVenuesConfig 场馆门票时间段配置
     * @return 场馆门票时间段配置
     */
    @Override
    public List<TicVenuesConfig> selectTicVenuesConfigList(TicVenuesConfig ticVenuesConfig)
    {
        return ticVenuesConfigMapper.selectTicVenuesConfigList(ticVenuesConfig);
    }

    /**
     * 新增场馆门票时间段配置
     * 
     * @param ticVenuesConfig 场馆门票时间段配置
     * @return 结果
     */
    @Override
    public int insertTicVenuesConfig(TicVenuesConfig ticVenuesConfig)
    {
        ticVenuesConfig.setCreateTime(DateUtils.getNowDate());
        return ticVenuesConfigMapper.insertTicVenuesConfig(ticVenuesConfig);
    }

    /**
     * 修改场馆门票时间段配置
     * 
     * @param ticVenuesConfig 场馆门票时间段配置
     * @return 结果
     */
    @Override
    public int updateTicVenuesConfig(TicVenuesConfig ticVenuesConfig)
    {
        ticVenuesConfig.setUpdateTime(DateUtils.getNowDate());
        return ticVenuesConfigMapper.updateTicVenuesConfig(ticVenuesConfig);
    }

    /**
     * 批量删除场馆门票时间段配置
     * 
     * @param ticVenuesConfigIds 需要删除的场馆门票时间段配置主键
     * @return 结果
     */
    @Override
    public int deleteTicVenuesConfigByTicVenuesConfigIds(Long[] ticVenuesConfigIds)
    {
        return ticVenuesConfigMapper.deleteTicVenuesConfigByTicVenuesConfigIds(ticVenuesConfigIds);
    }

    /**
     * 删除场馆门票时间段配置信息
     * 
     * @param ticVenuesConfigId 场馆门票时间段配置主键
     * @return 结果
     */
    @Override
    public int deleteTicVenuesConfigByTicVenuesConfigId(Long ticVenuesConfigId)
    {
        return ticVenuesConfigMapper.deleteTicVenuesConfigByTicVenuesConfigId(ticVenuesConfigId);
    }
}
